package com.xmim.fulcrum;

import com.xmim.core.container.ContainerConfig;
import com.xmim.core.util.IPUtil;
import lombok.Data;

@Data
public class FulcrumConfig implements ContainerConfig {
    private String host;
    private Integer port;
    private String zkAddress;
    private String rootPath;
    private String counterUserPath;
    private String counterServicePath;
    private String seqPrefixPath;
    private String userNodePath;
    private String serviceNodePath;

    public FulcrumConfig() {
        this.host = IPUtil.getLocalIP();
        this.port = 9000;
        this.zkAddress = "127.0.0.1:2181";
        this.rootPath = "/im/nodes";
        this.counterUserPath = rootPath + "/onlineUserCount";
        this.counterServicePath = rootPath + "/onlineServiceCount";
        this.seqPrefixPath = "seq-";
        this.userNodePath = rootPath + "/userNodes";
        this.serviceNodePath = rootPath + "/serviceNodes";
    }
}
